<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>根据时间输出</title>
		<style type="text/css">
			div{
				text-align: center;
				width: 500px;
				height: 400px;
				border: 1px #000000 solid;
				margin: 50px auto;
			}
		</style>
	</head>
	<body>
		<div>
			<script type="text/javascript">
				 var times  = prompt("请输入当前时间","");
				 
				 if(times>=6&&times<=12){
				 	document.write("上午好，欢迎来到贵美！" + "<br />");
				 	for (var i = 0;i<times;i++) {
				 		document.write("<img src='img/smile.gif' />");
				 	}
				 }
				else if(times>=13&&times<=20){
				 	document.write("下午好，欢迎来到贵美！" + "<br />");
				 	for (var i = 0;i<times;i++) {
				 		document.write("<img src='img/aftermoon.gif' />");
				 	}
				 }
				 else{
				 	document.write("夜深了，该休息了！" + "<br />");
				 	for (var i = 0;i<times;i++) {
				 		document.write("<img src='img/moon.gif' />");
				 	}
				 }
				
				
			</script>
			
			
		</div>
	</body>
</html>
